Imports Clo = Enhancements.Core.Logging
Imports Ref = System.Reflection
Imports Sys = System

Namespace Enhancements.Basic.Expressions.Functions
    ''' <summary>The exception that is thrown when a type for use in a function signature result is not valid.</summary>
    <Serializable(), DebuggerStepThrough()> _
    Public NotInheritable Class FunctionSignatureResultTypeIsValidNotException
        Inherits Exception

        Private Sub New(ByVal _type As Sys.Type)
            MyBase.New()
            [Type] = _type
        End Sub

        Private __Type As System.Type = Nothing
        ''' <summary>Gets the type that caused this exception.</summary>
        Public Property [Type]() As System.Type
            Get
                Return __Type
            End Get
            Private Set(ByVal _value As System.Type)
                __Type = _value
            End Set
        End Property

        ''' <summary>Throws an exception.</summary>
        ''' <param name="_type">Type that is causing the exception.</param>
        ''' <exception cref="FunctionSignatureResultTypeIsValidNotException"> </exception>
        Friend Shared Sub ___Throw(ByVal _type As Sys.Type)
            Dim _exception As FunctionSignatureResultTypeIsValidNotException = New FunctionSignatureResultTypeIsValidNotException(_type)

            Throw _exception
        End Sub

    End Class
End Namespace
